<template>
	<el-dialog v-model="_d.visible" draggable :close-on-click-modal="false" width="70%">
		<template #header>
			<div style="color: #fff">关联项目</div>
		</template>
	  <el-table :data="_d.list" style="width: 100%" border height="500px">
			<el-table-column type="index" label="序号" width="55" align="center" />
			<el-table-column prop="projectCode" min-width="100px" label="项目编号" align="center" />
			<el-table-column prop="projectName" min-width="200px" label="项目名称" align="center" />
			<el-table-column prop="budget" min-width="100px" label="项目预算金额" align="center" />
			<el-table-column prop="contractAmount" min-width="100px" label="项目合同金额" align="center" />
			<el-table-column prop="managerName" min-width="100px" label="项目负责人" align="center" />
			<el-table-column prop="depName" min-width="100px" label="项目所在部门" align="center" />
			<el-table-column prop="createtime" min-width="150px" label="项目创建时间" align="center" />
		</el-table>
		<template #footer>
			<span class="dialog-footer">
				<el-button @click="cancel">关 闭</el-button>
			</span>
		</template>
	</el-dialog>
</template>

<script lang="ts" setup>
import { reactive, ref, computed, onMounted } from 'vue';
import { ElNotification } from 'element-plus';
import {verifyPhone, verifyTelPhone} from "/@/utils/toolsValidate.ts";
import {$get, $post} from '/@/utils/request';


const _d = reactive({
	visible: false,
	row: null,

	list: []
});

onMounted(() => {
	
});

// 打开弹窗
const open = (row) => {
	_d.list = [];
	_d.row = row;
	getList();

	_d.visible = true;
};

// 获取列表
const getList = () => {
	$post('/budgetSrv/getdetail/'+_d.row.id).then(res => {
		_d.list = res.result;
	})
}

// 取消
const cancel = () => {
	_d.visible = false;
};

// 导出对象
defineExpose({ open });

</script>
<style lang="scss" scoped>

</style>
